package com.makemoney.miniprogram.modules.users.rest;

import com.makemoney.miniprogram.common.result.CommonResult;
import com.makemoney.miniprogram.modules.users.service.IResourceService;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@RestController
@RequestMapping("/resource")
@Tag(name = "资源")
public class ResourceController {

    @Resource
    private IResourceService resourceService;

    @Operation(summary = "更新资源", description = "增加或修改接口后,调用此接口更新数据库信息.")
    @PostMapping("/update")
    public CommonResult update() {
        return CommonResult.success(resourceService.update());
    }
}
